unit uPublicTools;

interface

uses
  System.SysUtils, System.Classes, uniDBGrid, uniGUIAbstractClasses, System.NetEncoding,
  TypInfo, System.Variants, Data.DB,uniTreeView, uniImage, Winapi.Windows, System.StrUtils,
  uDESCrypt,uMD5,Winapi.Messages;

type
  TPublicTools = class
  private

  public
    class function DeCryptFieldValue(KeyIDValue, DeCryptValue: string): string;
      end;

implementation

{ TPublicTools }

class function TPublicTools.DeCryptFieldValue(KeyIDValue, DeCryptValue: string): string;
var
  Key: string;
begin
  inherited;
  Result := EmptyStr;
  if SameText(DeCryptValue, EmptyStr) then
    Exit;
  try
    Key := GetPwdHash(KeyIDValue);
    Result := DeCryptStr(DeCryptValue, Key);
  except
   // Result := DeCryptValue;
  end;
end;


end.

